﻿using System;
using DotNetBurner.Core;

namespace DotNetBurner
{
    public static class PageGlimpse
    {
        public static void RequestSiteThumbnail(string url, string devKey)
        {
            string reqUrl = "http://images.pageglimpse.com/v1/thumbnails/request?url={0}&devkey={1}".FormatWith(url, devKey);

            WebUtility.BeginGetDataFromUrl(EndRequestSiteThumbnail, null, reqUrl);
        }

        static void EndRequestSiteThumbnail(IAsyncResult result)
        {
            WebUtility.EndGetDataFromUrl(result);
        }
    }
}
